/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "窗口.h"


using namespace std;


static S_Window* g_当前激活窗口 = nullptr;


S_Window* f_创建窗口(std::string 标题, S_设备环境& Ctx, ivec4 rect, uint8 采样, std::string dllPath) {
	S_Window* 窗口 = new S_Window(Ctx);

	窗口->f_创建窗口(标题, rect.x, rect.y, rect.z, rect.w, 0);

	g_当前激活窗口 = 窗口;
	return 窗口;
}


S_Window* f_创建VK窗口(string 标题, S_设备环境& Ctx, int32 x, int32 y, int32 w, int32 h, string dllPath) {
	S_Window* 窗口 = new S_Window(Ctx);

	窗口->f_创建窗口(标题, x, y, w, h, 0, dllPath);
	return 窗口;
}

S_Window* f_创建DX窗口(string 标题, S_设备环境& Ctx, int32 x, int32 y, int32 w, int32 h, string dllPath) {
	S_Window* 窗口 = new S_Window(Ctx);

	窗口->f_创建窗口(标题, x, y, 窗口->m_Size.x, 窗口->m_Size.y, 0, dllPath);
	return 窗口;
}

void f_window_销毁(S_Window* 窗口) {
	delete 窗口;
}

void f_window_set输入法窗口位置(const ivec2& pos) {

}

void f_window_set窗口标题(S_Window* window, std::wstring 标题) {

}

vec2 f_window_get当前窗口大小() {
	return { float32(g_当前激活窗口->m_Size.x), float32(g_当前激活窗口->m_Size.y) };
	return vec2();
}

